package com.lsw.jgyf.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.lsw.Base.BaseHolder;
import com.lsw.Base.BaseSimpleAdapter;
import com.lsw.jgyf.R;
import com.lsw.jgyf.model.PopupWindowSortModel;


/**
 * Created by lsw on 2017/12/18.
 */

public class PopupWindowSortAdapter extends BaseSimpleAdapter<PopupWindowSortModel> {
    public PopupWindowSortAdapter(Context context) {
        super(context);
    }

    @Override
    protected BaseHolder<PopupWindowSortModel> getHolder() {
        return new BaseHolder<PopupWindowSortModel>() {
            TextView text;

            @Override
            public void bindViews(View parentView) {
                text = parentView.findViewById(R.id.text);
            }

            @Override
            public void bindData(PopupWindowSortModel item, int position) {
                text.setText(item.getName());
            }
        };
    }

    @Override
    protected int getLayoutResource() {
        return R.layout.item_popupwindow_sort;
    }
}
